<?php
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2024 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Process;

class BaseController {

	protected $data = ['code' => 1, 'message' => 'success', 'data' => []];

	public function __construct(Request $request){
		if ($request->filled('page')) {
			$offset = ($request->input('page', 1) - 1) * $request->input('limit', 30);
			$request->mergeIfMissing(['offset' => $offset]);
		}
	}
}
